package com.dong.springcloud.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author DJ
 * @description 返回给前端的通用JSON实体串
 * @date 2021/12/24 10:15 下午
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {

    /**
     * 状态码
     */
    private Integer code;
    /**
     * 返回信息
     */
    private String message;
    /**
     * 返回值
     */
    private T data;

    public CommonResult(Integer code, String message) {
        this(code, message, null);
    }
}
